import sql from "mssql";
const config = {
  user: "sa",
  password: "yyyy1234",
  server: "localhost", // You can use 'localhost\\instance' to connect to named instance
  database: "t_user",
  stream: false, // You can enable streaming globally
  /*option:{
   encrypt:true //Use this if you're on Windows Azure
   },*/
  pool: {
    min: 0,
    idleTimeoutMillis: 3000,
  },
};

export const msCon = async () => {
  console.log(11);
  try {
    await sql.connect(config);
    const result = await sql.query`select * from mytable`;
    console.dir(result);
  } catch (error) {
    console.log(error);
  }
};
